﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddProduct.aspx.cs" Inherits="MyShop.AddProduct" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div style="margin:15px;">
        <a runat="server" href="~/Admin.aspx?"> Go Back </a>
    <fieldset style="width:500px; margin-right:10px">
        <legend>Add product</legend>
        <div style="margin:3px">
            <asp:Label ID="Label1" runat="server" AssociatedControlID="GroupProductDropDownList">Group Product</asp:Label>
            <asp:DropDownList
              id="GroupProductDropDownList"
              runat="server"
              DataTextField="Name"
              DataValueField="ID" DataSourceID="SqlDataSource3"
              >
          </asp:DropDownList>
            <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:ShopConnectionString %>" SelectCommand="SELECT * FROM [ProductGroup]"></asp:SqlDataSource>
        </div>
        <div style="margin:3px">
            <asp:Label ID="Label5" runat="server">Company Name</asp:Label>
            <asp:DropDownList
                id="CompanyNameDropDownList"
                runat="server"
                DataTextField="Name"
                DataValueField="ID"
                 DataSourceID="SqlDataSource4"
                ></asp:DropDownList>
            <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:ShopConnectionString %>" SelectCommand="SELECT * FROM [ProductCompany]"></asp:SqlDataSource>
            <%--<asp:TextBox ID="CompanyName" runat="server" />--%>
        </div>
        <div style="margin:3px">
            <asp:Label ID="Label2" runat="server" AssociatedControlID="ModelName">Model Name</asp:Label>
            <asp:TextBox ID="ModelName" runat="server" />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="ModelName" CssClass="field-validation-error" ErrorMessage="The ModelName field is required." />
        </div>
        <div style="vertical-align:top;margin:3px">
            <div style="vertical-align:top;float:left">
            <asp:Label ID="Label3" runat="server" AssociatedControlID="Description">Description</asp:Label>

            </div>
            <asp:TextBox TextMode="MultiLine" Height="30" ID="Description" runat="server"/>
        </div>
        <div style="margin:3px">
            <asp:Label ID="Label6"  runat="server" AssociatedControlID="Price" >Price</asp:Label>
            <asp:TextBox ID="Price" runat="server" Width="50" text="0"/>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="Price" CssClass="field-validation-error" 
                ErrorMessage="The Price field is required." />
        </div>
        <div style="margin:3px">
            <asp:Label ID="Label4" runat="server" AssociatedControlID="Count">Count</asp:Label>
            <asp:TextBox ID="Count" runat="server" text="1" TextMode="Number" Width="40"/>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="Count" 
                CssClass="field-validation-error" ErrorMessage="The Count field is required." />
        </div>
        <div style="margin:3px">
            <asp:FileUpload runat="server" ID="ImageUpload"/>
           <%-- <asp:Button ID="UploadButton" Text="Upload" runat="server" OnClick="UploadButton_Click"/>--%>
        </div>
        <asp:Button ID="AddProducts" runat="server" CommandName="MoveOrder" Text="Add product in base" Width="171px" OnClick="AddProduct_Click" />
        </fieldset>
    </div>
    </form>
</body>
</html>
